//
//  CardImageTableViewCell.m
//  TSListDemo
//
//  Created by qian on 2020/11/16.
//  Copyright © 2020 dvlproad. All rights reserved.
//

#import "CardImageTableViewCell.h"
#import <Masonry/Masonry.h>

@interface CardImageTableViewCell () {
    
}

@end



@implementation CardImageTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self setupViews];
    }
    return self;
}


#pragma mark - SetupViews & Lazy
- (void)setupViews {
    self.layer.masksToBounds = YES;
    
    [self.contentView addSubview:self.backgroundImageView];
    [self.backgroundImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.mas_equalTo(self.contentView);
        make.top.mas_equalTo(self.contentView);
//        make.height.mas_equalTo(100);
        make.bottom.mas_equalTo(self.contentView);
    }];
}

- (UIImageView *)backgroundImageView {
    if (_backgroundImageView == nil) {
        _backgroundImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
    }
    return _backgroundImageView;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
